Optimal. Leaf size=195 \[ \frac {b^2 n^2 \left (d+e \sqrt {x}\right )^2}{2 e^2}+\frac {4 a b d n \sqrt {x}}{e}-\frac {4 b^2 d n^2 \sqrt {x}}{e}+\frac {4 b^2 d n \left (d+e \sqrt {x}\right ) \log \left (c \left (d+e \sqrt {x}\right )^n\right )}{e^2}-\frac {b n \left (d+e \sqrt {x}\right )^2 \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )}{e^2}-\frac {2 d \left (d+e \sqrt {x}\right ) \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )^2}{e^2}+\frac {\left (d+e \sqrt {x}\right )^2 \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )^2}{e^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 195, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 8, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {2501, 2448,
2436, 2333, 2332, 2437, 2342, 2341} \begin {gather*} -\frac {b n \left (d+e \sqrt {x}\right )^2 \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )}{e^2}+\frac {\left (d+e \sqrt {x}\right )^2 \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )^2}{e^2}-\frac {2 d \left (d+e \sqrt {x}\right ) \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )^2}{e^2}+\frac {4 a b d n \sqrt {x}}{e}+\frac {4 b^2 d n \left (d+e \sqrt {x}\right ) \log \left (c \left (d+e \sqrt {x}\right )^n\right )}{e^2}+\frac {b^2 n^2 \left (d+e \sqrt {x}\right )^2}{2 e^2}-\frac {4 b^2 d n^2 \sqrt {x}}{e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2332
Rule 2333
Rule 2341
Rule 2342
Rule 2436
Rule 2437
Rule 2448
Rule 2501
Rubi steps
\begin {align*} \int \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )^2 \, dx &=2 \text {Subst}\left (\int x \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \, dx,x,\sqrt {x}\right )\\ &=2 \text {Subst}\left (\int \left (-\frac {d \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e}+\frac {(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e}\right ) \, dx,x,\sqrt {x}\right )\\ &=\frac {2 \text {Subst}\left (\int (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \, dx,x,\sqrt {x}\right )}{e}-\frac {(2 d) \text {Subst}\left (\int \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \, dx,x,\sqrt {x}\right )}{e}\\ &=\frac {2 \text {Subst}\left (\int x \left (a+b \log \left (c x^n\right )\right )^2 \, dx,x,d+e \sqrt {x}\right )}{e^2}-\frac {(2 d) \text {Subst}\left (\int \left (a+b \log \left (c x^n\right )\right )^2 \, dx,x,d+e \sqrt {x}\right )}{e^2}\\ &=-\frac {2 d \left (d+e \sqrt {x}\right ) \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )^2}{e^2}+\frac {\left (d+e \sqrt {x}\right )^2 \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )^2}{e^2}-\frac {(2 b n) \text {Subst}\left (\int x \left (a+b \log \left (c x^n\right )\right ) \, dx,x,d+e \sqrt {x}\right )}{e^2}+\frac {(4 b d n) \text {Subst}\left (\int \left (a+b \log \left (c x^n\right )\right ) \, dx,x,d+e \sqrt {x}\right )}{e^2}\\ &=\frac {b^2 n^2 \left (d+e \sqrt {x}\right )^2}{2 e^2}+\frac {4 a b d n \sqrt {x}}{e}-\frac {b n \left (d+e \sqrt {x}\right )^2 \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )}{e^2}-\frac {2 d \left (d+e \sqrt {x}\right ) \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )^2}{e^2}+\frac {\left (d+e \sqrt {x}\right )^2 \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )^2}{e^2}+\frac {\left (4 b^2 d n\right ) \text {Subst}\left (\int \log \left (c x^n\right ) \, dx,x,d+e \sqrt {x}\right )}{e^2}\\ &=\frac {b^2 n^2 \left (d+e \sqrt {x}\right )^2}{2 e^2}+\frac {4 a b d n \sqrt {x}}{e}-\frac {4 b^2 d n^2 \sqrt {x}}{e}+\frac {4 b^2 d n \left (d+e \sqrt {x}\right ) \log \left (c \left (d+e \sqrt {x}\right )^n\right )}{e^2}-\frac {b n \left (d+e \sqrt {x}\right )^2 \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )}{e^2}-\frac {2 d \left (d+e \sqrt {x}\right ) \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )^2}{e^2}+\frac {\left (d+e \sqrt {x}\right )^2 \left (a+b \log \left (c \left (d+e \sqrt {x}\right )^n\right )\right )^2}{e^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 150, normalized size = 0.77 \begin {gather*} \frac {-2 a b n \left (d-e \sqrt {x}\right )^2+b^2 e n^2 \left (-6 d+e \sqrt {x}\right ) \sqrt {x}-2 a^2 \left (d^2-e^2 x\right )+2 b \left (d+e \sqrt {x}\right ) \left (-2 a d+3 b d n+2 a e \sqrt {x}-b e n \sqrt {x}\right ) \log \left (c \left (d+e \sqrt {x}\right )^n\right )-2 b^2 \left (d^2-e^2 x\right ) \log ^2\left (c \left (d+e \sqrt {x}\right )^n\right )}{2 e^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.02, size = 0, normalized size = 0.00 \[\int \left (a +b \ln \left (c \left (d +e \sqrt {x}\right )^{n}\right )\right )^{2}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 184, normalized size = 0.94 \begin {gather*} -{\left ({\left (2 \, d^{2} e^{\left (-3\right )} \log \left (\sqrt {x} e + d\right ) + {\left (x e - 2 \, d \sqrt {x}\right )} e^{\left (-2\right )}\right )} n e - 2 \, x \log \left ({\left (\sqrt {x} e + d\right )}^{n} c\right )\right )} a b + \frac {1}{2} \, {\left ({\left (2 \, d^{2} \log \left (\sqrt {x} e + d\right )^{2} + 6 \, d^{2} \log \left (\sqrt {x} e + d\right ) - 6 \, d \sqrt {x} e + x e^{2}\right )} n^{2} e^{\left (-2\right )} - 2 \, {\left (2 \, d^{2} e^{\left (-3\right )} \log \left (\sqrt {x} e + d\right ) + {\left (x e - 2 \, d \sqrt {x}\right )} e^{\left (-2\right )}\right )} n e \log \left ({\left (\sqrt {x} e + d\right )}^{n} c\right ) + 2 \, x \log \left ({\left (\sqrt {x} e + d\right )}^{n} c\right )^{2}\right )} b^{2} + a^{2} x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 213, normalized size = 1.09 \begin {gather*} \frac {1}{2} \, {\left (2 \, b^{2} x e^{2} \log \left (c\right )^{2} - 2 \, {\left (b^{2} n - 2 \, a b\right )} x e^{2} \log \left (c\right ) + {\left (b^{2} n^{2} - 2 \, a b n + 2 \, a^{2}\right )} x e^{2} - 2 \, {\left (b^{2} d^{2} n^{2} - b^{2} n^{2} x e^{2}\right )} \log \left (\sqrt {x} e + d\right )^{2} + 2 \, {\left (2 \, b^{2} d n^{2} \sqrt {x} e + 3 \, b^{2} d^{2} n^{2} - 2 \, a b d^{2} n - {\left (b^{2} n^{2} - 2 \, a b n\right )} x e^{2} - 2 \, {\left (b^{2} d^{2} n - b^{2} n x e^{2}\right )} \log \left (c\right )\right )} \log \left (\sqrt {x} e + d\right ) + 2 \, {\left (2 \, b^{2} d n e \log \left (c\right ) - {\left (3 \, b^{2} d n^{2} - 2 \, a b d n\right )} e\right )} \sqrt {x}\right )} e^{\left (-2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \log {\left (c \left (d + e \sqrt {x}\right )^{n} \right )}\right )^{2}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 361 vs.
\(2 (173) = 346\).
time = 5.50, size = 361, normalized size = 1.85 \begin {gather*} \frac {1}{2} \, {\left ({\left (2 \, {\left (\sqrt {x} e + d\right )}^{2} \log \left (\sqrt {x} e + d\right )^{2} - 4 \, {\left (\sqrt {x} e + d\right )} d \log \left (\sqrt {x} e + d\right )^{2} - 2 \, {\left (\sqrt {x} e + d\right )}^{2} \log \left (\sqrt {x} e + d\right ) + 8 \, {\left (\sqrt {x} e + d\right )} d \log \left (\sqrt {x} e + d\right ) + {\left (\sqrt {x} e + d\right )}^{2} - 8 \, {\left (\sqrt {x} e + d\right )} d\right )} b^{2} n^{2} e^{\left (-1\right )} + 2 \, {\left (2 \, {\left (\sqrt {x} e + d\right )}^{2} \log \left (\sqrt {x} e + d\right ) - 4 \, {\left (\sqrt {x} e + d\right )} d \log \left (\sqrt {x} e + d\right ) - {\left (\sqrt {x} e + d\right )}^{2} + 4 \, {\left (\sqrt {x} e + d\right )} d\right )} b^{2} n e^{\left (-1\right )} \log \left (c\right ) + 2 \, {\left ({\left (\sqrt {x} e + d\right )}^{2} - 2 \, {\left (\sqrt {x} e + d\right )} d\right )} b^{2} e^{\left (-1\right )} \log \left (c\right )^{2} + 2 \, {\left (2 \, {\left (\sqrt {x} e + d\right )}^{2} \log \left (\sqrt {x} e + d\right ) - 4 \, {\left (\sqrt {x} e + d\right )} d \log \left (\sqrt {x} e + d\right ) - {\left (\sqrt {x} e + d\right )}^{2} + 4 \, {\left (\sqrt {x} e + d\right )} d\right )} a b n e^{\left (-1\right )} + 4 \, {\left ({\left (\sqrt {x} e + d\right )}^{2} - 2 \, {\left (\sqrt {x} e + d\right )} d\right )} a b e^{\left (-1\right )} \log \left (c\right ) + 2 \, {\left ({\left (\sqrt {x} e + d\right )}^{2} - 2 \, {\left (\sqrt {x} e + d\right )} d\right )} a^{2} e^{\left (-1\right )}\right )} e^{\left (-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.47, size = 186, normalized size = 0.95 \begin {gather*} x\,\left (a^2-a\,b\,n+\frac {b^2\,n^2}{2}\right )-\sqrt {x}\,\left (\frac {d\,\left (2\,a^2-2\,a\,b\,n+b^2\,n^2\right )}{e}-\frac {2\,d\,\left (a^2-b^2\,n^2\right )}{e}\right )+{\ln \left (c\,{\left (d+e\,\sqrt {x}\right )}^n\right )}^2\,\left (b^2\,x-\frac {b^2\,d^2}{e^2}\right )-\ln \left (c\,{\left (d+e\,\sqrt {x}\right )}^n\right )\,\left (\sqrt {x}\,\left (\frac {2\,b\,d\,\left (2\,a-b\,n\right )}{e}-\frac {4\,a\,b\,d}{e}\right )-b\,x\,\left (2\,a-b\,n\right )\right )+\frac {\ln \left (d+e\,\sqrt {x}\right )\,\left (3\,b^2\,d^2\,n^2-2\,a\,b\,d^2\,n\right )}{e^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________